package com.cbn.ibcp.web.jishiting.operator.convert;

import com.cbn.ibcp.common.utils.bean.BeanUtils;
import com.cbn.ibcp.jishiting.media.bo.EpisodeResourceStreamBO;
import com.cbn.ibcp.jishiting.media.domain.EpisodeResourceStream;
import com.cbn.ibcp.web.jishiting.operator.dto.EpisodeResourceStreamDTO;

public class EpisodeResourceStreamDTOConvert {

    public static EpisodeResourceStream convertTOEpisodeResourceStream(EpisodeResourceStreamDTO episodeResourceStreamDTO) {
        if (episodeResourceStreamDTO == null) {
            return null;
        }
        EpisodeResourceStream episodeResourceStream = new EpisodeResourceStream();
        BeanUtils.copyBeanProp(episodeResourceStream, episodeResourceStreamDTO);
        episodeResourceStream.setId(episodeResourceStreamDTO.getEpisodeId());
        return episodeResourceStream;
    }

    public static EpisodeResourceStreamBO convertTOEpisodeResourceStreamBO(EpisodeResourceStreamDTO episodeResourceStreamDTO) {
        if (episodeResourceStreamDTO == null) {
            return null;
        }
        EpisodeResourceStreamBO episodeResourceStreamBO = new EpisodeResourceStreamBO();
        BeanUtils.copyBeanProp(episodeResourceStreamBO, episodeResourceStreamDTO);
        return episodeResourceStreamBO;
    }
}
